﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;
namespace BUS
{
    public class LoaiHangBUS
    {
        public bool KtLoaiHang(string TenLoaiHang)
        {
            LoaiHangDAO LoaiHang = new LoaiHangDAO();
            return LoaiHang.KtLoaiHang(TenLoaiHang);
        }
        public bool ThemLoaiHang(string TenLoaiHang)
        {
            LoaiHangDAO LoaiHang = new LoaiHangDAO();
            return LoaiHang.ThemLoaiHang(TenLoaiHang);
        }
        public List<LoaiHangDTO> LayLoaiHang()
        {
            LoaiHangDAO lh = new LoaiHangDAO();
            return lh.LayLoaiHang();
        }
        public LoaiHangDTO LayLoaiHangTheoMa(int MaLoaiHang)
        {
            LoaiHangDAO lh = new LoaiHangDAO();
            return lh.LayLoaiHangTheoMa(MaLoaiHang);
        }
        public bool CapNhatLoaiHang(string TenLoaiHangMoi, string TenLoaiHangCu)
        { 
            LoaiHangDAO lh = new LoaiHangDAO();
            return lh.CapNhatLoaiHang(TenLoaiHangMoi, TenLoaiHangCu);
        }
        public bool XoaLoaiHang(string TenLoaiHang)
        {
            LoaiHangDAO lh = new LoaiHangDAO();
            return lh.XoaLoaiHang(TenLoaiHang);
        }
    }
}
